From 532f75bea033e8073c4c1bc1dff72fa6af7d5316 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 24 Dec 2024 09:26:32 +0000 Subject: Upgrades to Astro 5 --- website/src/pages/blog/[...slug].astro | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'website/src/pages/blog/[...slug].astro') diff --git a/website/src/pages/blog/[...slug].astro b/website/src/pages/blog/[...slug].astro index 800c534..0754ea7 100644 --- a/website/src/pages/blog/[...slug].astro +++ b/website/src/pages/blog/[...slug].astro @@ -1,20 +1,20 @@ --- -import { type CollectionEntry, getCollection } from 'astro:content'; +import { type CollectionEntry, getCollection, render } from 'astro:content'; import BlogPost from '../../layouts/BlogPost.astro'; export async function getStaticPaths() { const posts = await getCollection('blog'); return posts.map((post) => ({ - params: { slug: post.slug }, + params: { slug: post.id }, props: post, })); } type Props = CollectionEntry<'blog'>; const post = Astro.props; -const { Content } = await post.render(); +const { Content } = await render(post); --- - \ No newline at end of file + -- cgit v1.2.3